#pragma once

#include "MathDefine.h"
#include "Vector3.h"	
#include "Matrix.h"

enum CameraType
{
	NAVIGATION_CAMERA
};

struct ProjectionInfo
{
	ProjectionInfo() :
	m_width( 1024 )
	,m_height( 768 )
	,m_near( 0.1f )
	,m_far( 1000.f )
	,m_fovy( PI / 3.f )
	{
	}

	float m_width;
	float m_height;
	float m_near;
	float m_far;
	float m_fovy;
};

class CameraBase
{
public:
	CameraBase(void);
	virtual ~CameraBase(void);

public:
	void GetCameraTransform( Matrix & out ) { out = m_cameraTransform; }
	void GetViewTransform( Matrix & out ) { m_cameraTransform.GetInverse( out ); }

public:
	void SetProjectionInfo( ProjectionInfo & info );
	void GetProjectionInfo( ProjectionInfo & out ) { out = m_projectionInfo; }

	void GetProjectionTransform( Matrix & out ) { out = m_projTransform; }

public:
	virtual void Update( float dTime ) {}
	virtual void HandleEvent( UINT message, WPARAM wParam, LPARAM lParam ) {}

protected:
	Matrix m_cameraTransform;

	ProjectionInfo m_projectionInfo;
	Matrix m_projTransform;
};
